package sync.hw.teacher.demo01;

/**
 * @author lwj
 * @date 2025-03-13
 * @vesion 1.0.0
 */
public class MainTest {
    public static void main(String[] args) {
        // 1.实例化一个账号对象
        Account account = new Account(5000);

        // 2.实例化 Runnable 对象
        MyRunnable mr01 = new MyRunnable(account,"老婆",3000);
        MyRunnable mr02 = new MyRunnable(account,"老公",4000);

        // 3.实例化线程对象
        Thread t1 = new Thread(mr01);
        Thread t2 = new Thread(mr02);

        // 4.启动线程
        t1.start();
        t2.start();
    }
}
